﻿/// <reference path="_namespace.js" />
/// <reference path="../components/Component.js"/>
/// <reference path="../drawing/Timer.js" />


/*****************************************************************************
Ajax library class definition. Kevin Robinson 2008.
Class: ajax.xna.Component
/*****************************************************************************/

ajax.lang.addNamespace("ajax.xna");
$imports("ajax.drawing.Timer");

//-----------------------------------------------------------------------------
ajax.xna.GameComponent = function(game)
{       
    ajax.xna.GameComponent.superConstructor.call(this, game.getDocument());        
    this._game = game;        
}
ajax.lang.extend("ajax.xna.GameComponent", "ajax.components.Component");
if ($getDesignMode()) ajax.xna.GameComponent.prototype = ajax.components.Component.prototype;
//-----------------------------------------------------------------------------

ajax.xna.GameComponent.prototype._game = null;

//-----------------------------------------------------------------------------
// Statics First
ajax.xna.GameComponent.cast = function(obj)
{///<returns type="ajax.xna.GameComponent"/>
    return obj;    
}
//-----------------------------------------------------------------------------


//-----------------------------------------------------------------------------
// Public virtual members
ajax.xna.GameComponent.prototype.getGame = function()
{///<returns type="ajax.xna.Game"/>
    return this._game;
}

//-----------------------------------------------------------------------------
// Public virtual methods
ajax.xna.GameComponent.prototype.initialize = function()
{///<summary>Override this to initialize your component. No need to call base.</summary>
}

ajax.xna.GameComponent.prototype.update = function(gameTime)
{///<param name="gameTime" type="ajax.drawing.Timer"/>  
 ///<summary>Override this to update your component each frame. No need to call base.</summary>
}

//-----------------------------------------------------------------------------
ajax.xna.GameComponent.prototype.toString = function()
{
    return "ajax.xna.GameComponent";
}
//-----------------------------------------------------------------------------



